Amiga Active list (858/1044)

From:Oliver Roberts
Date:27 Sep 2001 at 17:15:04
Subject:Re: [amigactive] Re: JPEGTMP ????????

Hi Andrew,

On 27-Sep-01 00:44:53 BST, Andrew Crowe wrote:

>> The whole idea of JPEGTMP is that it is used as temporary storage for
>> when there is not enough real memory to decode the image completely.
>> So, if you're running low on memory, the JPEG decoder will use disk
> buffers
>> to swap data into and out of real memory (much like virtual memory
> really).

> Are you sure? When ever I was on a page with progressive JPEGS on it it
> always used to ask for JPEGTMP until I finally got round to assigning it,
> and I have plenty of memory so I thought it was always used to just store
> temporary decoding information rather then be used as virtual memory.

Well, there's also a max memory setting available, which tells JPEG
decoders how much memory they are allowed to use (on a per image basis).
In most applications the default is often 4Mb. This assumes that most
applications that are able to decode JPEGs actually use libjpeg :)
However, this limit does not include the memory required to store the
output image, which will be allocated separately by the application.

>> > used to hold decoded jpeg information temporarally until it is moved
> from
>> > the location on disk into memory, so it ends up in RAM anyway.
>>
>> True, but only small chunks at a time - once it's finished with one
>> chunk, the JPEG decoder removes it from memory and loads another from
>> disk.

> Surely it still needs a copy of the completly decoded image buffered in
> memory anyway though so that it can be converted down from 24 bit to
> whatever and displayed on-screen

Sure, the final output image needs to be in memory, but that memory is
allocated beforehand by the application and has nothing to do with the
memory that the JPEG decoder itself will allocate. In a worst case
scenario, the workspace required to decode a progressive JPEG is at least
as much as the memory required to store the final output image. So,
essentially the full image is stored in memory twice - however, the
memory used by the decoder can of course be swapped in/out to JPEGTMP:.
Obviously, once the image has been completely decoded, the workspace
the decoder used is freed. Normal JPEGs are nowhere near as greedy, as
only a few rows of workspace are required, rather than the entire image.

Hmmm... I'm probably going into far too much detail here aren't I? :)
It's just that knowing libjpeg inside out, having used it myself for
various applications, these are the terms I think in.



*Oliver Roberts* - software developer & web designer
http://www.oliver-roberts.co.uk/ - ICQ: 34640231
/oliver@futaura.co.uk/ | /oliver.roberts@iname.com/


WarpJPEG.datatype ==> http://www.nanunanu.org/~oliver/warpjpeg.html


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Pinpoint the right security solution for your company- Learn how to add 128- bit encryption and to authenticate your web site with VeriSign's FREE guide!
http://us.click.yahoo.com/yQix2C/33_CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->

Quote carefully and read all ADMIN:README mails
To unsubscribe mailto:amigactive-unsubscribe@yahoogroups.com
Anyone sending unsubscribe messages to the list will be SHOT!

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/